home *** CD-ROM | disk | FTP | other *** search
- #define __USERWND_H
-
-
- #ifndef __AWNDOBJ_H
- #include "awndobj.h"
- #endif
- #ifndef __WNDIDATA_H
- #include "wndidata.h"
- #endif
-
-
- class usercls
- {
- public:
-
- usercls();
-
- char *cname;
- char *mname;
- DWORD style;
- HICON icon;
- HBRUSH bkbrush;
- HCURSOR cursor;
-
- int reg();
- };
-
- class userwnd:public abswndobj
- {
- public:
-
- userwnd();
- ~userwnd();
-
- HWND wnd;
-
- virtual LRESULT onmsg(UINT msg, WPARAM wp, LPARAM lp) = 0;
-
- HWND getwnd()
- {
- return wnd;
- }
- void del()
- {
- if (wnd != 0)
- {
- DestroyWindow(wnd); /* wnd will be set to 0 in WM_DESTROY */
- }
- }
- int create(usercls &c, wndinitdata &d)
- {
- d.p = this;
-
- return (wnd = d.create(c.cname)) != 0;
- }
- void detach();
- void attach(HWND wnd);
- };
-
-